<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>双向绑定</title>
</head>

<body>
    <div id="div">
        <form>
            <!--四个文本输入框,值为username，均双向绑定username-->
            <input type="text" name="username" v-model="username"><br>
            <input type="text" name="username" v-model="username"><br>
            <input type="text" name="username" v-model="username"><br>
            <input type="text" name="username" v-model="username"><br>
        </form>
    </div>

    <script src="js/vue.js"></script>
    <script>
        new Vue({
            el:"#div",
            data:{
                username:"张三",
                age:23,
                gender:"男"
            }
        });
    </script>
</body>
</html>